InvalidChannelException.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 19
cc 1
rs 9.4285
1
/**
2
 * When the channel type is not the one defined for the command
3
 *
4
 * @class InvalidChannelException
5
 * @extends {Error}
6
 */
7
class InvalidChannelException extends Error {
8
    /**
9
     * Creates an instance of InvalidChannelException.
10
     * @param {string} channel The channel type. See https://discord.js.org/#/docs/main/stable/class/Channel?scrollTo=type
11
     * @memberof InvalidChannelException
12
     */
13
  constructor (channel) {
14
    super('The command must be executed in the channel: ' + channel)
15
        /**
16
         * The channel type required
17
         * @type {string}
18
         * @name InvalidChannelException#channelRequired
19
         * @readonly
20
         */
21
    this.channelRequired = channel
22
        /**
23
         * The fisherCode
24
         * @readonly
25
         * @constant
26
         * @name InvalidChannelException#code
27
         * @type {number}
28
         * @default 400
29
         */
30
    this.code = 400
31
  }
32
}
33
module.exports = InvalidChannelException
34